package com.bailian.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.bailian.common.annotation.Excel;
import com.bailian.common.core.domain.BaseEntity;
import javax.validation.constraints.*;
import org.hibernate.validator.constraints.Length;

/**
 * 仓库预约列表对象 bl_appointment
 * 
 * @author bailian
 * @date 2025-08-04
 */
public class BlAppointment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long appointmentId;

    /** 仓库ID */
    @NotNull(message = "仓库ID不能为空")
    @Min(value = 1, message = "仓库ID必须大于0")
    @Excel(name = "仓库ID")
    private Long warehouseId;

    /** 预约日期 */
    @NotNull(message = "预约日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预约日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date visitDate;

    /** 预约时间 */
    @NotBlank(message = "预约时间不能为空")
    @Excel(name = "预约时间")
    private String visitTime;

    /** 参观人数 */
    @NotBlank(message = "参观人数不能为空")
    @Excel(name = "参观人数")
    private String visitorCount;

    /** 联系人姓名 */
    @NotBlank(message = "联系人姓名不能为空")
    @Length(min = 1, max = 50, message = "联系人姓名长度必须在1-50个字符之间")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z\\s]+$", message = "联系人姓名只能包含中文、英文和空格")
    @Excel(name = "联系人姓名")
    private String contactName;

    /** 联系电话 */
    @NotBlank(message = "联系电话不能为空")
    @Pattern(regexp = "^1[3-9]\\d{9}$|^0\\d{2,3}-?\\d{7,8}$", message = "联系电话格式不正确")
    @Length(max = 20, message = "联系电话长度不能超过20位")
    @Excel(name = "联系电话")
    private String contactPhone;

    /** 电子邮箱 */
    @Email(message = "电子邮箱格式不正确")
    @Length(max = 100, message = "电子邮箱长度不能超过100位")
    @Excel(name = "电子邮箱")
    private String email;

    /** 备注信息 */
    @Excel(name = "备注信息")
    private String remarks;

    /** 预约状态（0，待确认，1已确认，2取消） */
    @Excel(name = "预约状态", readConverterExp = "0=，待确认，1已确认，2取消 3 驳回")
    private Integer status;

    /** 审批时间 */
    private Date approveTime;

    /** 审批人ID */
    @Excel(name = "审批人ID")
    private Long approveId;

    /** 申请人ID */
    @Excel(name = "申请人ID")
    private Long userId;

    /** 所属公司 */
    @Length(max = 100, message = "所属公司长度不能超过100个字符")
    @Excel(name = "所属公司")
    private String belongCompany;

    /** 驳回原因 */
    @Length(max = 500, message = "驳回原因长度不能超过500个字符")
    @Excel(name = "驳回原因")
    private String rejectionReasons;

    public void setAppointmentId(Long appointmentId) 
    {
        this.appointmentId = appointmentId;
    }

    public Long getAppointmentId() 
    {
        return appointmentId;
    }

    public void setWarehouseId(Long warehouseId) 
    {
        this.warehouseId = warehouseId;
    }

    public Long getWarehouseId() 
    {
        return warehouseId;
    }

    public void setVisitDate(Date visitDate) 
    {
        this.visitDate = visitDate;
    }

    public Date getVisitDate() 
    {
        return visitDate;
    }

    public void setVisitTime(String visitTime)
    {
        this.visitTime = visitTime;
    }

    public String getVisitTime()
    {
        return visitTime;
    }

    public void setVisitorCount(String visitorCount) 
    {
        this.visitorCount = visitorCount;
    }

    public String getVisitorCount() 
    {
        return visitorCount;
    }

    public void setContactName(String contactName) 
    {
        this.contactName = contactName;
    }

    public String getContactName() 
    {
        return contactName;
    }

    public void setContactPhone(String contactPhone) 
    {
        this.contactPhone = contactPhone;
    }

    public String getContactPhone() 
    {
        return contactPhone;
    }

    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }

    public void setRemarks(String remarks) 
    {
        this.remarks = remarks;
    }

    public String getRemarks() 
    {
        return remarks;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    public void setApproveTime(Date approveTime) 
    {
        this.approveTime = approveTime;
    }

    public Date getApproveTime() 
    {
        return approveTime;
    }

    public void setApproveId(Long approveId) 
    {
        this.approveId = approveId;
    }

    public Long getApproveId() 
    {
        return approveId;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public String getBelongCompany() 
    {
        return belongCompany;
    }

    public void setBelongCompany(String belongCompany) 
    {
        this.belongCompany = belongCompany;
    }

    public String getRejectionReasons() 
    {
        return rejectionReasons;
    }

    public void setRejectionReasons(String rejectionReasons) 
    {
        this.rejectionReasons = rejectionReasons;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("appointmentId", getAppointmentId())
            .append("warehouseId", getWarehouseId())
            .append("visitDate", getVisitDate())
            .append("visitTime", getVisitTime())
            .append("visitorCount", getVisitorCount())
            .append("contactName", getContactName())
            .append("contactPhone", getContactPhone())
            .append("email", getEmail())
            .append("remarks", getRemarks())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("approveTime", getApproveTime())
            .append("approveId", getApproveId())
            .append("userId", getUserId())
            .append("belongCompany", getBelongCompany())
            .append("rejectionReasons", getRejectionReasons())
            .toString();
    }
}
